package com.mobileservice.autoreply.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.mobileservice.autoreply.R;
import com.mobileservice.autoreply.base.BaseActivity;
import com.mobileservice.autoreply.ui.customizeui.TopBar;

public class MainActivity extends BaseActivity implements OnClickListener {

	/** Define Home Screen Button */
	private Button sms_btn, phone_btn, backup_restore_btn, settings_btn;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// load the layout
		setContentView(R.layout.main_screen);
		baseActivity = this;
		/** Find the button view */
		topBar = (TopBar) findViewById(R.id.topbar);

		sms_btn = (Button) findViewById(R.id.sms_screen_btn);
		phone_btn = (Button) findViewById(R.id.phone_call_screen_btn);
		backup_restore_btn = (Button) findViewById(R.id.backup_restore_screen_btn);
		settings_btn = (Button) findViewById(R.id.setting_screen_btn);

		/** Set button Listener */
		sms_btn.setOnClickListener(this);
		phone_btn.setOnClickListener(this);
		backup_restore_btn.setOnClickListener(this);
		settings_btn.setOnClickListener(this);

	}

	@Override
	public void onClick(View arg0) {
		int idView = arg0.getId();

		switch (idView) {
		case R.id.sms_screen_btn:
			startActivity(new Intent(MainActivity.this, BlockMessageActivity.class));
			break;

		case R.id.phone_call_screen_btn:
			startActivity(new Intent(MainActivity.this, BlockinComingCallActivity.class));
			break;
		case R.id.backup_restore_screen_btn:
			startActivity(new Intent(MainActivity.this, AutoReplyActivity.class));
			break;

		case R.id.setting_screen_btn:
			startActivity(new Intent(MainActivity.this, SettingActivity.class));
			break;

		}
	}

}
